import axios from 'axios'
import qs from 'qs'
const prefix1 = "/api/front/return"
const headers = {
     'Content-Type': 'application/x-www-form-urlencoded'
    // 'Content-Type': 'application/json'
}

export const myReturn = async function(info={}){
    // 如果是Get提交，参数放在params属性中，而且不需要进行转换
    let response= await axios({
        // headers,
        headers,
        method:"get",
        url:prefix1,
        params:info
    })
     console.log(response.data.data.data);
    return response.data.data;
}
export const AddReturn = async function(ReturnTwoDTO={}){
    let response= await axios({
        headers,
        method:"post",
        url:prefix1,
        data:qs.stringify(ReturnTwoDTO)
    })
    return response.data;
}
export const sendMq= async function(ReturnMonDTO={}){
    let response= await axios({
        headers,
        method:"post",
        url:prefix1+"/mq",
        data:qs.stringify(ReturnMonDTO)
    })
    return response.data;
}
export const selectOrder= async function(orderId){
    let response= await axios({
        // headers,
        method:"get",
        url:"/api/front/orders/"+orderId,
         params:{orderId}
    })
    return response.data;
}

